import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class FlashScreen implements Screen {
	MyGame myGame;
	Texture textureBg;
	SpriteBatch spriteBatch;

	public FlashScreen(MyGame myGame) {
		this.myGame = myGame;
	}

	@Override
	public void dispose() {
		textureBg = null;

	}

	@Override
	public void hide() {

	}

	@Override
	public void pause() {

	}

	@Override
	public void render(float arg0) {
		Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
		spriteBatch.begin();
		spriteBatch.draw(textureBg, 0, 0);
		spriteBatch.end();
		if (Gdx.input.isTouched()) {
			myGame.setScreen(new GameScreen());
		}
	}

	@Override
	public void resize(int arg0, int arg1) {

	}

	@Override
	public void resume() {

	}

	@Override
	public void show() {
		textureBg = new Texture(Gdx.files.internal("res/28105041-snsd6.jpg"));
		spriteBatch = new SpriteBatch();
	}

}
